package com.ruoyi.hotel.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hotel.mapper.HlCardMapper;
import com.ruoyi.hotel.domain.HlCard;
import com.ruoyi.hotel.service.IHlCardService;

/**
 * 证件类型Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-12-10
 */
@Service
public class HlCardServiceImpl implements IHlCardService 
{
    @Autowired
    private HlCardMapper hlCardMapper;

    /**
     * 查询证件类型
     * 
     * @param id 证件类型主键
     * @return 证件类型
     */
    @Override
    public HlCard selectHlCardById(Long id)
    {
        return hlCardMapper.selectHlCardById(id);
    }

    /**
     * 查询证件类型列表
     * 
     * @param hlCard 证件类型
     * @return 证件类型
     */
    @Override
    public List<HlCard> selectHlCardList(HlCard hlCard)
    {
        return hlCardMapper.selectHlCardList(hlCard);
    }

    /**
     * 新增证件类型
     * 
     * @param hlCard 证件类型
     * @return 结果
     */
    @Override
    public int insertHlCard(HlCard hlCard)
    {
        hlCard.setCreateTime(DateUtils.getNowDate());
        return hlCardMapper.insertHlCard(hlCard);
    }

    /**
     * 修改证件类型
     * 
     * @param hlCard 证件类型
     * @return 结果
     */
    @Override
    public int updateHlCard(HlCard hlCard)
    {
        hlCard.setUpdateTime(DateUtils.getNowDate());
        return hlCardMapper.updateHlCard(hlCard);
    }

    /**
     * 批量删除证件类型
     * 
     * @param ids 需要删除的证件类型主键
     * @return 结果
     */
    @Override
    public int deleteHlCardByIds(Long[] ids)
    {
        return hlCardMapper.deleteHlCardByIds(ids);
    }

    /**
     * 删除证件类型信息
     * 
     * @param id 证件类型主键
     * @return 结果
     */
    @Override
    public int deleteHlCardById(Long id)
    {
        return hlCardMapper.deleteHlCardById(id);
    }
}
